<template>
  <div class="demo1">
    <div>
      <button @click="buttonAdd">点击</button>
      <button @click="time=0">重置</button>
      <p>点击了{{time}}次</p>

    </div>
  </div>

</template>

<script>
  export default {
    name: 'demo1',
    components: {},
    props: {},
    data() {
      return {
        time: 0
      };
    },
    mounted() {
    },
    methods: {
      buttonAdd() {
        this.time = this.time + 1
      }
    },
    computed: {}
  };
</script>

<style scoped lang="scss">
  .demo1 {
  }
</style>
<style lang="scss">
  .demo1 {
  }
</style>
